<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>comments-list</title>
<%@include file="../../common.jsp"%>
<script type="text/javascript" src="${staticPath}/js/app/comments/list.js"></script>
<style type="text/css">
<!--
.contHeader .contOHeader {
	background-color: white;
	z-index: 100;
}

.weui-pull-to-refresh-layer {
	width: 100%;
}
.weui-pull-to-refresh-layer div{
	width: 80px;
}
-->
</style>
</head>
<body>
<header class="contHeader">
    <div class="contOHeader">
        <h1>全部评价</h1>
        <div class="contOHeadBack"><a href="javascript:history.go(-1);"  ><img src="${staticPath}/images/back2.png"></a></div>
    </div>
	<input id="total_pages" type="hidden" value="${pagedComments.totalPages}"/>
	<input type="hidden" id ="page"  value="${pagedComments.number}"/>
	<input type="hidden" id ="goods_id"  value="${goodsId}"/>
	<input type="hidden" id ="sort_input"  value=""/>
</header>
<div id="content" style="overflow-x: hidden;">
	<div class="weui-pull-to-refresh-layer" >
	   <div class="pull-to-refresh-arrow"></div> <!-- 上下拉动的时候显示的箭头 -->
	   <div class="pull-to-refresh-preloader"></div> <!-- 正在刷新的菊花 -->
	   <div class="down">下拉刷新</div><!-- 下拉过程显示的文案 -->
	   <div class="up">释放刷新</div><!-- 下拉超过50px显示的文案 -->
	   <div class="refresh" id="refresh">正在刷新...</div><!-- 正在刷新时显示的文案 -->
	 </div>
	<div class="weui_panel_bd" id="comments_div">
		<c:forEach items="${pagedComments.content}" var="comment" >
	       <div class="weui_media_box weui_media_text">
	         <h4 class="weui_media_title" style="float:left;">${comment.member.name}</h4><img src="${comment.member.dealer!=null?comment.member.dealer.dealerLevel.imgUrl:memberLevelImageUrl}" style="width:20px;height:20px;">
	         <p class="weui_media_desc">${comment.content}</p>
	         <c:forEach begin="1" end="5" step="1" var="i" >
	         	<c:set var="imageKey" value="image${i==1?'':i}" />
	         	<c:if test="${comment[imageKey]!=null&&comment[imageKey]!=''}">
		         	<img src="${comment[imageKey]}" style="width:80px;height:80px;margin-top:10px;">
	         	</c:if>
	         </c:forEach>
	       </div>
		</c:forEach>
	</div>
	<div class="weui-infinite-scroll" id="loading-div" style="display:none;">
	  <div class="infinite-preloader"></div>
		  正在加载... 
	</div>
</div>
</body>
</html>